package com.yvon.service.demo.spring.beans.factory;

import com.yvon.service.demo.spring.beans.BeansException;

import java.util.Map;

public interface ListableBeanFactory extends BeanFactory {

    /**
     * 按照类型返回Bean实例
     *
     * @param type 类型
     * @return {@code Map<String, T> }
     */
    <T> Map<String, T> getBeansOfType(Class<T> type) throws BeansException;

    /**
     * 返回注册表中所有Bean的名称
     *
     * @return {@code String[] }
     */
    String[] getBeanDefinitions();
}
